package wangjg.mda.gen;

import java.util.HashMap;
import java.util.Map;

import wangjg.mda.model.obj.ModelDataType;

public class OracleDataType {

	public static final Map<String, String> dataTypes = new HashMap<String, String>();

	public static final String BYTE = "char";
	public static final String CHARA = "char";
	public static final String SHORT = "number(5)";
	public static final String INTEGER = "number(10)";
	public static final String LONG = "number(19)";
	public static final String FLOAT = "float";
	public static final String DOUBLE = "float";
	public static final String STRING = "varchar2";
	public static final String DATE = "timestamp(6)";

	static {
		dataTypes.put(ModelDataType.BYTE, OracleDataType.BYTE);
		dataTypes.put(ModelDataType.CHAR, OracleDataType.CHARA);
		dataTypes.put(ModelDataType.SHORT, OracleDataType.SHORT);
		dataTypes.put(ModelDataType.INTEGER, OracleDataType.INTEGER);
		dataTypes.put(ModelDataType.LONG, OracleDataType.LONG);
		dataTypes.put(ModelDataType.FLOAT, OracleDataType.FLOAT);
		dataTypes.put(ModelDataType.DOUBLE, OracleDataType.DOUBLE);
		dataTypes.put(ModelDataType.STRING, OracleDataType.STRING);
		dataTypes.put(ModelDataType.DATE, OracleDataType.DATE);
		dataTypes.put(ModelDataType.TIMESTAMP, OracleDataType.DATE);
	}

}
